<template>
  <div class="content">
    <van-nav-bar title="小春通讯" left-arrow  @click-left="goBack">
        <template #left>
            <img src="@/assets/back.png" alt="" class="back">
        </template>
    </van-nav-bar>
    <div class="top">
        <img src="@/assets/shop/new/succ.png" alt="" class="img">
    </div>
    <div class="center">
      <div class="add_btn">
        <van-button class="btn">添加导师领好礼</van-button>
      </div>
      <div class="items">
        <div class="item" v-for="(item,index) in list" :key="index">
          <div class="item_title">{{item.title}}</div>
          <div class="item_content">{{item.content}}</div>
        </div>
      </div>
    </div>
    <div class="steps">
      <div class="step">
        <div class="title">
          <div class="number">1</div>
          <div class="name">第一步</div>
        </div>
        <van-button class="btn">立即添加导师微信</van-button>
      </div>
      <div class="ellipsis">
        <div></div><div></div><div></div>
      </div>
      <div class="step">
        <div class="title">
          <div class="number">2</div>
          <div class="name">第二步</div>
        </div>
        <van-button class="btn">新人之旅待开启</van-button>
      </div>
    </div>
    <div class="btns">
      <van-button class="btn" @click="toNext">下一步</van-button>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      list:[
        {title:'好礼一',content:'导师带教\n大咖教育'},
        {title:'好礼二',content:'1314商品\n一键同步'},
        {title:'好礼三',content:'开通友聊\n群聊功能'},
        {title:'好礼四',content:'共享十万\n会员'},
      ]
    }
  },
  mounted(){

  },
  methods:{
    goBack(){
      this.$router.go(-1)
    },
    toNext(){
      this.$router.push("/newShopQuestionnaire");
    }
  }
}
</script>

<style scoped>
div {
    box-sizing: border-box;
}
.content {
  min-height: 100vh;
  background-size: 100%;
  font-family: Alibaba PuHuiTi;
  padding-bottom: 10px;
}
.back {
    height: 22px;
}
.top .img {
  width: 100vw;
}
/* 中间区域 */
.center {
  width: calc(100% - 20px);
  height: calc( (100vw - 20px) * .614);
  margin: -140px 10px 0;
  padding: 25px 10px;
  position: relative;
  background-image: url('../../assets/shop/new/succCenter.png');
  background-size: 100%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.center .add_btn{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.center .add_btn .btn {
  width: 85%;
  height: 46px;
  background: linear-gradient(0deg, #FEF1DB, #FFC288);
  box-shadow: 0px 2px 2px 0px rgba(201,67,2,0.4);
  border-radius: 6px;
  border: none;
  font-size: 18px;
  font-family: Alibaba PuHuiTi;
  font-weight: bold;
  color: #D91B42;
}
.center .items {
  margin-top: 10px;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.center .items .item {
  position: relative;
  width: 24%;
  height: 100%;
  background: linear-gradient(0deg, #FFC288, #FEF1DB);
  border: 1px solid #fff0e0;
  border-radius: 6px;
  white-space: pre-wrap;
}
.center .items .item::before {
  content: '';
  position: absolute;
  right: 50%;
  top: 0;
  transform: translateX(50%) translateY(-100%);
  width: 0;
  height: 0;
  line-height: 0;
  border: 10px solid transparent;
  border-bottom-color: #fff0e0;
}
.center .items .item .item_title{
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #CD262B;
  line-height: 31px;
  text-align: center;
}
.center .items .item .item_content{
  width: 100%;
  height: calc(100% - 31px);
  background-color: #b00233;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 500;
  line-height: 24px;
  color: #FFFFFF;
  text-align: center;
  border-radius: 0 0 6px 6px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 步骤 */
.steps {
  width: calc(100% - 20px);
  margin: -0 auto;
  padding: 20px 0;
}
.steps .step{
  height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 0 5px;
}
.steps .step .title {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.steps .step .title  .number {
  width: 24px;
  height: 24px;
  background: #FA2C1E;
  border-radius: 50%;
  font-size: 16px;
  font-family: PingFang SC;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
}

.steps .step .title .name {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 600;
  color: #FA2C1E;
  line-height: 22px;
}

.steps .step .btn {
  width: 64%;
  height: 46px;
  background: linear-gradient(90deg, #FA2C1E, #FF4050);
  box-shadow: 0px 2px 2px 0px rgba(201,67,2,0.4);
  border-radius: 23px;
  border: none;
  font-size: 16px;
  font-family: PingFang SC;
  color: #FFFFFF;
}


.steps .ellipsis {
  display: flex;
  flex-direction: column;
  height: 21px;
  justify-content: space-between;
  margin: 5px 0;
  margin-left: 15px;
}
.steps .ellipsis div{
  width: 4px;
  height: 4px;
  background: #FA2C1E;
  border-radius: 50%;
}

/* 按钮 */
.btns {
  width: 85%;
  margin: 0 auto;
  padding: 10px 0;
}
.btns .btn {
  width: 100%;
  height: 46px;
  background: linear-gradient(0deg, #FEF1DB, #FFC288);
  box-shadow: 0px 2px 2px 0px rgba(201,67,2,0.4);
  border-radius: 23px;
  border: none;
  font-size: 18px;
  font-family: Alibaba PuHuiTi;
  font-weight: bold;
  color: #D91B42;
}
</style>